package com.hongye.broker.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hongye.broker.mapper.GroupMapper;
import com.hongye.broker.service.GroupService;
import com.hongye.common.entity.CustomerEntity;
import com.hongye.common.entity.GroupEntity;
import com.hongye.broker.vo.GroupCustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupServiceImpl extends ServiceImpl<GroupMapper,GroupEntity> implements GroupService {

    @Autowired
    private GroupMapper groupMapper;
    @Override
    public List<GroupEntity> findAll() {

        return groupMapper.findAll();
    }

    @Override
    public GroupCustomerVo xiangqing(Integer groupId) {
        return groupMapper.xiangqing(groupId);
    }


    @Override
    public List<CustomerEntity> tgyh(Integer groupId) {
        return groupMapper.tgyh(groupId);
    }

    @Override
    public void del(Integer customerId) {
        groupMapper.del(customerId);
    }

    @Override
    public void update(Integer groupId,Integer open_status) {
        groupMapper.update(groupId,open_status);
    }

    @Override
    public void dele(Integer groupId) {
        groupMapper.dele(groupId);
    }

    @Override
    public void insert(GroupEntity groupEntity) {
        groupMapper.insert(groupEntity);
    }

    @Override
    public void kaituan(GroupEntity groupEntity) {
        this.updateById(groupEntity);
    }
}
